//
//  vspProtocol.h
//  妙居
//
//  Created by xuqijin on 20/07/2017.
//  Copyright © 2017 程杰. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface vspProtocol : NSObject

+ (NSDictionary *)decodeCommonRes:(NSData *)data;

+ (NSData *)encodeLogin:(NSString *)username pwd:(NSString *)password;

+ (NSDictionary *)decodeLoginRes:(NSData *)data;

+ (NSData *)encodeLogout:(NSString *)cuId;

+ (NSData *)encodeGetCMSRoute:(NSArray *)ipArray;

+ (NSDictionary *)decodeGetCMSRouteRes:(NSData *)data;

+ (NSData *)encodeHeartbeat;


+ (NSData *)encodeTTData:(NSNumber *)cuid
                  toPuid:(NSNumber *)toPuid
                 content:(NSString *)content;

+ (NSData *)encodeTTData:(NSNumber *)cuid
                  toCuid:(NSNumber *)toCuid
                 content:(NSString *)content;

+ (NSData *)encodeLccsCmd:(NSString *)content;



+ (NSDictionary *)decodeTTData:(NSData *)data;

+ (NSDictionary *)decodeLccsCmd:(NSData *)data;

+ (NSDictionary *)decodePuState:(NSData *)data;

+ (NSData *) stringToHexData:(NSString *)hexStr;
// tool
+ (NSNumber *)parseNumber:(NSData *)data;
+ (NSString *)hexStringFromData:(NSData *)data;
+ (NSData *)formNumberData:(NSInteger )bytesCount
                   content:(NSNumber *)content;

+(NSData *)encodeSearchWifi:(NSString*)content;

@end
